package com.ruoyi.system.domain.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Data
@ApiModel(value = "DesignStatisticsVO", description = "设计项目统计数据")
public class DesignStatisticsVO {

    @ApiModelProperty(value = "总设计项目数")
    private Integer totalDesignCount;

    @ApiModelProperty(value = "平均方案耗时(天)")
    private BigDecimal avgDesignDays;

    @ApiModelProperty(value = "总出图量")
    private Integer totalImageCount;

    @ApiModelProperty(value = "素材平均使用率")
    private BigDecimal avgMaterialUsageRate;

    @ApiModelProperty(value = "设计师耗时统计列表")
    private List<DesignerTimeStatsVO> designerTimeStats;

    @ApiModelProperty(value = "设计师出图量统计列表")
    private List<DesignerImageStatsVO> designerImageStats;

    @ApiModelProperty(value = "素材使用次数统计(按时间维度)")
    private Map<String, Map<String, Integer>> materialUsageByTime;

    @Data
    @ApiModel(value = "DesignerTimeStatsVO", description = "设计师耗时统计")
    public static class DesignerTimeStatsVO {
        @ApiModelProperty(value = "设计师ID")
        private Long designerId;

        @ApiModelProperty(value = "设计师姓名")
        private String designerName;

        @ApiModelProperty(value = "平均耗时(天)")
        private BigDecimal avgDays;

        @ApiModelProperty(value = "最快耗时(天)")
        private Integer fastestDays;

        @ApiModelProperty(value = "最慢耗时(天)")
        private Integer slowestDays;

        @ApiModelProperty(value = "完成项目数")
        private Integer completedProjectCount;
    }

    @Data
    @ApiModel(value = "DesignerImageStatsVO", description = "设计师出图量统计")
    public static class DesignerImageStatsVO {
        @ApiModelProperty(value = "设计师ID")
        private Long designerId;

        @ApiModelProperty(value = "设计师姓名")
        private String designerName;

        @ApiModelProperty(value = "总出图量")
        private Integer totalImageCount;

        @ApiModelProperty(value = "空间维度出图量，key为空间类型，value为数量")
        private Map<String, Integer> spaceImageCountMap;
    }
}